bioshockfandomcom-20200223-history
User talk:Ltearth
Welcome Hi, welcome to the BioShock Wiki! Thanks for your edit to the User talk:Gardimuer page. Need some help finding your way around? Here are some good places to look: ;New to editing? *Check the Community Portal for a list of ways you could start helping out around the wiki. *The BioShock Wiki:Manual of Style is also good reading for any new editor. *The can teach you about how to edit and how use the wiki tools. ;Questions? Feel free to ask an administrator or a ' ', or leave a message on my talk page if I can help with anything! -- Gardimuer (Talk) 15:23, 2011 August 24 Countdown I'm surprised you noticed our countdown code. We haven't used it since the release of BioShock 2 in early 2010. There are many different countdown codes you could use on wikis, and some are actually better than what we used here. Ours is only special in that it had extra code to make the text of the countdown flash once it reached the end date. The code we used was developed by MegaScience and myself. I'll give you an explanation of our code in case you want to use it. Otherwise, I recommend using the countdown code by Splarka at DevWiki: w:c:dev:Countdown. ~'Gardimuer' [[User talk:Gardimuer|{ ʈalk }]] 17:53, August 24, 2011 (UTC) Explanation dateFuture = new Date(2010,1,9,0,0,0); *The numbers within the parenthesis are the end date of the countdown in the following format: (year,month,day,hours,minutes,seconds) if(amount < 0)... *The part after this defines what shows when the countdown reaches the end date. For BioShock Wiki, we had the text "BioShock 2 has Launched." in flashing colors. if(flicker 0) { $("#countbox").html(" BioShock 2 has Launched."); flicker=1; } *The part in the parenthesis after .html is the full html code for the message we wanted to display. else if(flicker 1){ $("#countbox").html(" BioShock 2 has Launched."); flicker=0; } *As the second part of the flicker, this contains the same text as the first part, but with a different color for the text. else{ *The parts after this define what shows when the timer has not yet reached the end date. BioShock 2 Launches in: " *This part within the span was just the text we wanted to show before the listing of days, minutes, seconds, etc. remaining till the end date, with some additional styling for the numbers that would be generated by the code. amount = ... *All of this part is calculations that make the time till the end date show in the proper numerical format. I've never taken the time to understand how it works, but you won't need to change it at all to use it on your wiki. if(days != 0){out += days +" day"+((days!=1)?"s":"")+", ";} if(days != 0 || hours != 0){out += hours +" hour"+((hours!=1)?"s":"")+", ";} if(days != 0 || hours != 0 || mins != 0){out += mins +" minute"+((mins!=1)?"s":"")+", ";} out += secs +" seconds"; *This makes the code output the days, hours, minutes, and seconds left to the end date with some adjustments to switch between singular and plural words when appropriate. The output is in the following format: ::# days, # hours, # minutes, # seconds *You'll notice there is also a closing in the code above, which is just to complete the span that was begun in the first part of the else{ condition. $("#countbox").html(out); *This line makes the code search for any element on a page that has the id "countbox", and makes the output of the countdown code display within it. On BioShock Wiki we used the Template:Countdown which contains As I mentioned, the countdown code we used here may not be best for your wiki. Compared to Splarka's code, ours is more complicated to customize. If you have any more questions, feel free to leave me a message on my talk page. ~'Gardimuer' [[User talk:Gardimuer|{ ʈalk }]] 17:53, August 24, 2011 (UTC) :One thing I noticed; the code you copied into Common.js has an error. You need to remove the text "Click to show code" at the beginning. I'm not sure that would stop the code from working, but it is likely. :While we're at it, I had a few questions for you. I'm curious how you found out about the version of the countdown we were using. Did you visit our site before the release of BioShock 2 and see it on our main page? :Also, I noticed that you tried using Splarka's countdown codes. Did they not work? ~'Gardimuer' [[User talk:Gardimuer|{ ʈalk }]] 20:39, August 24, 2011 (UTC)